﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace StatePattern
{
    class ConcreteState1:State
    {
        public override void handle1()
        {
            //TODO:本状态下必须要处理的业务逻辑
        }
        /// <summary>
        /// 状态切换
        /// </summary>
        public override void handle2()
        {
            //切换状态
            base.Context.State = Context.STATE2;
            //过度到State2状态，有Context实现、
            base.Context.State.handle2();
        }
    }
}
